Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Language Guide / Part 2 - AppleScript Language Reference
Chapter 7 - Control Statements / Tell Statements


Tell (Compound Statement)

A compound Tell statement specifies the default target of the commands
it contains.

SYNTAX
tell referenceToObject 
   [ statement ]...
end [ tell ]
where

referenceToObject is a reference to an application object, system object, or
script object.

statement is any AppleScript statement.

EXAMPLES
tell application "Scriptable Text Editor"   tell front window
      close
   end tell
end tell
tell front window of application "Scriptable Text Editor"   close
end tell
tell application "Scriptable Text Editor" of machine ¬
   "Mitch's PowerBook" of zone "Apple Berkeley"      tell front window
         close
      end tell
end tell
NOTES
If referenceToObject specifies an application on a remote computer, additional conditions must be met. These conditions are described in "References to Applications," which begins on page 145.

If referenceToObject specifies an application on the same computer that is not running, AppleScript launches the application.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996